package circle;

/**
 * @author 陈艺博
 * @date 2021-02-25 11:10
 * @description 测试循环队列
 **/
public class CircleQueueTest {
    public static void main(String[] args) {
        CircleQueue<Integer> queue = new CircleQueue<>();
        /**
         *  0 1 2 3 4 5 6 7 8 9
         */
        for (int i = 0; i < 10 ; i++) {
            queue.enqueue(i);
        }
        /**
         *   5 6 7 8 9
         */
        for (int i = 0; i < 5; i++) {
            queue.deQueue();
        }
        /**
         *   5 6 7 8 9 10
         */
        for (int i =0 ; i < 23; i++) {
            queue.enqueue(i);
        }
        System.out.println(queue);
        while (!queue.isEmpty()){
            System.out.println(queue.deQueue());
        }

    }
}
